package com.hoyue.classroom.controller;

import com.hoyue.classroom.bean.Course;
import com.hoyue.classroom.service.HomeworkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/interact")
public class InteractController {

    private String prefix = "interact";



    @GetMapping()
    public String homework(Model model, HttpSession session)
    {
        Course course = (Course) session.getAttribute("course");
        model.addAttribute("course",course);
        return prefix + "/interact";
    }

}
